// @ts-ignore
/* eslint-disable */
import request from '@/request'

/** addUserCoupon POST /api/userCoupon/add */
export async function addUserCouponUsingPost(
  body: API.UserCouponAddRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseLong_>('/api/userCoupon/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** deleteUserCoupon POST /api/userCoupon/delete */
export async function deleteUserCouponUsingPost(
  body: API.DeleteRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/userCoupon/delete', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** getUserCouponVOById GET /api/userCoupon/get/vo */
export async function getUserCouponVoByIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getUserCouponVOByIdUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseUserCouponVO_>('/api/userCoupon/get/vo', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** listUserCouponByPage POST /api/userCoupon/list/page */
export async function listUserCouponByPageUsingPost(
  body: API.UserCouponQueryRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageUserCouponVO_>('/api/userCoupon/list/page', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** listOrderCanUseCoupon GET /api/userCoupon/my/canUser */
export async function listOrderCanUseCouponUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.listOrderCanUseCouponUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseListCouponVO_>('/api/userCoupon/my/canUser', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** listMyUserCouponVOByPage POST /api/userCoupon/my/list/page/vo */
export async function listMyUserCouponVoByPageUsingPost(
  body: API.UserCouponQueryRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageUserCouponVO_>('/api/userCoupon/my/list/page/vo', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** updateUserCoupon POST /api/userCoupon/update */
export async function updateUserCouponUsingPost(
  body: API.UserCouponUpdateRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/userCoupon/update', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}
